# -*- cperl -*-
{
    my $s = <<"____END_EXPECT";
rm -f {foo,bar,foobar}.txt
update foo.txt
update bar.txt
update foobar.txt
bar.txt
foobar.txt
foo.txt
foo
bar
2 foobar.txt
rm -f {foo,bar,foobar}.txt
echo all done
all done
____END_EXPECT
    ;
    my @r;
    do { push @r, $_ if !m/^smart:.+$/ } for @result;
    my $r = join '', @r;
    $check_result = $r eq $s;
    $_ = "$file.log";
    unlink if -f;
    do {
        open F, ">$file.log" or die "$!";
        print F
            "==================== expect ==\n",
            $s, "\n",
            "==================== result ==\n",
            $r ;
        close F;
    } unless $check_result;
    print "";
}
